<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>表单进阶-字段集</title>
    <style>
        fieldset{
            border: 1px solid blue;
            width: 400px;
            height: 200px;
        }
        legend{
            border: 1px solid red;
            text-align: center;
            padding: 10px;
            /* margin: 10px; */
        }
    </style>
</head>
<body>
     <h1>表单进阶-字段集</h1>

     <fieldset>
         <legend>性别</legend>
         <input type="radio" name="a">男
         <br>
         <input type="radio" name="a">女
     </fieldset>

     <fieldset>
         <legend>爱好</legend>
         <input type="checkbox" name="b">足球
         <br>
         <input type="checkbox" name="b">篮球
     </fieldset>
</body>
</html>